package com.zuipin.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.zuipin.entity.User;
import com.zuipin.service.UserService;

@RestController
public class UserController {
	@Autowired
	private UserService userService;
	
	
	

	@RequestMapping(value = "/login")
	public String login(@RequestParam User user) {
		return userService.login(user);
	}
	
	@RequestMapping(value = "/{id}")
	public User getUser(@PathVariable("id") int id){
		return userService.testSelect(id);
	}
	
	
	
	
	
	
}
